import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'

export default defineConfig({
    plugins: [vue()],
    resolve: {
        alias: {
            '@': resolve(__dirname, './src')
        }
    },
    optimizeDeps: {
        include: ['monaco-editor/esm/vs/language/json/json.worker']
    },
    server: {
        hmr: {
            overlay: true
        },

    },
    build: {
        rollupOptions: {
            output: {
                manualChunks: {
                    jsonWorker: ['monaco-editor/esm/vs/language/json/json.worker'],
                    editorWorker: ['monaco-editor/esm/vs/editor/editor.worker']
                }
            }
        }
    }
})
